package com.edu.zju.scs.panacea.entity.query;

import com.edu.zju.scs.panacea.utils.StringUtil;

/**
 * @Author: Yue Liang
 * @Date: 2018-12-28 13:54
 *封装查询资源位的条件
 */
public class LocQuery {
    /**
     * 资源位ID
     */
    private Long id;

    /**
     * 资源位名称
     */
    private String name;

    /**
     * 设备所在省份
     */
    private String province;

    /**
     * 设备所在城市
     */
    private String city;

    /**
     * 设备所在区域
     */
    private String district;

    /**
     * 模板类型 0：图片 1：视频 2：h5
     */
    private Integer templateType;

    /**
     * 指定站点
     */
    private Long siteId;


    public Long getSiteId() {
        return siteId;
    }

    public void setSiteId(Long siteId) {
        this.siteId = siteId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        if (province != null && StringUtil.isTrimEmpty(province)) {
            province = null;
        }
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        if (city != null && StringUtil.isTrimEmpty(city)) {
            city = null;
        }
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        if (district != null && StringUtil.isTrimEmpty(district)) {
            district = null;
        }
        this.district = district;
    }

    public Integer getTemplateType() {
        return templateType;
    }

    public void setTemplateType(Integer templateType) {
        this.templateType = templateType;
    }

    @Override
    public String toString() {
        return "LocQuery{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", district='" + district + '\'' +
                ", templateType=" + templateType +
                '}';
    }
}
